package easyjava.qixi.bean;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Table(name="user")
@Entity
public class User {
	  @Id
	  @Column(name="id")
      private int id;
	  @Column(name="username")
      private String username;
      @Column(name="name")
      private String name;
      @Column(name="age")
      private String age;
      @Column(name="height")
      private String height;
      @Column(name="gender")
      private String gender;
      @Column(name="phone")
      private String phone;
      @OneToOne(mappedBy="eUser")
      private Education education;
      @OneToMany(mappedBy="user")
      private Set<Invitation> inviter;
      @OneToMany(mappedBy="users")
      private Set<Invitation> invitee;
      @OneToOne(mappedBy="pUser")
      private UserPassword userPassword;
      @OneToMany(mappedBy="user")
      private Set<Interest> interest;
      
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAge() {
		return age;
	}
	public void setAge(String age) {
		this.age = age;
	}
	public String getHeight() {
		return height;
	}
	public void setHeight(String height) {
		this.height = height;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public Education getEducation() {
		return education;
	}
	public void setEducation(Education education) {
		this.education = education;
	}
	public Set<Invitation> getInviter() {
		return inviter;
	}
	public void setInviter(Set<Invitation> inviter) {
		this.inviter = inviter;
	}
	public Set<Invitation> getInvitee() {
		return invitee;
	}
	public void setInvitee(Set<Invitation> invitee) {
		this.invitee = invitee;
	}
	public UserPassword getUserPassword() {
		return userPassword;
	}
	public void setUserPassword(UserPassword userPassword) {
		this.userPassword = userPassword;
	}
	public Set<Interest> getInterest() {
		return interest;
	}
	public void setInterest(Set<Interest> interest) {
		this.interest = interest;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", name=" + name + ", age=" + age + ", height=" + height
				+ ", gender=" + gender + ", phone=" + phone + "]";
	}
      
}
